<?php
require_once 'includes/haut.php';
acces($niveau,1);

require_once 'includes/donneesFormulaires.php';

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>R&eacute;servations</title>




		<?php include('includes/headLinks.php');?>
		<script type="text/javascript" src="js/overlay.js"></script>
		<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
		<script type="text/javascript" src="js/triTable.js"></script>
		<script type="text/javascript" src="js/autocompletionMat.js"></script>
		<script type="text/javascript" src="js/autocompletionUsagers.js"></script>
	</head>
<body>

	<div id="entete">


	<?php include('includes/entete.php'); ?>
	</div>

	<div id="navigation">


	<?php include('includes/navigation.php'); ?>
	</div>

	<div id="principal">
		<h2>R&eacute;servations</h2>

		<form action=rechercheRes.php method="post" id="formRecherche">
			<div class="recherche">
				<input type="search" name="recherche" id="recherche" /> <input
					type="submit" name="rechercher" value="Rechercher" /> <input
					type="hidden" name="action" value="rechercher" />
				<div class="suggestionsBox" id="suggestions">
					<img src="images/icones/upArrow.png" alt="upArrow" />
					<div class="suggestionList" id="autoSuggestionsList"></div>
				</div>
			</div>
		</form>
		
		
		
		
			<?php 
			$titres=array('Client', 'Pr&eacute;nom', 'Du', 'Au', 'Activit&eacute;', 'Mat&eacute;riel', 'Niveau', 'Taille');
			
			if (!isset ($_GET['statut'])){
				header("Location:indexAdmin.php");
				exit();
			}
			else {
				$statut = $_GET['statut'];
				$liens = getLiens($tabStatut, $statut);
			}
			?>
			
			<div class="liens">
				<a href="reservations.php?statut=<?php echo $liens[0];?>" class="lienG"><?php echo $tabStatut[$liens[0]];?></a>
				<a href="reservations.php?statut=<?php echo $liens[1];?>" class="lienD"><?php echo $tabStatut[$liens[1]];?></a>	
			</div>
				
			<table class="tabListe">
			<caption><?php echo $tabStatut[$statut];?></caption>
				<thead> <tr><?php //ecriture des titres de colonnes
					foreach($titres as $x){
						echo'<th>'.$x.'</th>';
					}?>
				</tr></thead>
				<tbody>
				<?php
				$req = reservation::getAllReservations($statut);

				afficherTabResa($req,$tabType, $tabNiveau, true);
				?>
				</tbody>
			 </table>

		</div>

	<div id="publicite">


	<?php include('includes/publicite.php'); ?>
	</div>
	
		<div class="simple_overlay" id="result">
	
		</div>
</body>
</html>
